package cn.hyy.controller;

import cn.hyy.client.UserClient;
import cn.hyy.client.UserClient_FallBack;
import cn.hyy.domain.User;
import com.netflix.discovery.converters.Auto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class FeignController {
    @Autowired
    private UserClient_FallBack fallBack;
    @GetMapping("/feign/{id}")
    public User feign(@PathVariable("id") Long id){
        return fallBack.getById(id);
    }
}
